package br.ufpi.esii.reqg.entities;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;

@Entity
@Inheritance( strategy = InheritanceType.TABLE_PER_CLASS )
public class Fluxo {

	@Id
	private Long id;

	@Column( nullable = false )
	@ElementCollection
	private List<String> preCondicao;

	@Column( nullable = false )
	@ElementCollection
	private List<String> passos;

	@ManyToOne( optional = false )
	private CasoDeUso casoDeUso;

	public Fluxo() {}

	public Long getId() {
		return id;
	}

	public void setId( Long id ) {
		this.id = id;
	}

	public List<String> getPreCondicao() {
		return preCondicao;
	}

	public void setPreCondicao( List<String> preCondicao ) {
		this.preCondicao = preCondicao;
	}

	public List<String> getPassos() {
		return passos;
	}

	public void setPassos( List<String> passos ) {
		this.passos = passos;
	}

	public CasoDeUso getCasoDeUso() {
		return casoDeUso;
	}

	public void setCasoDeUso( CasoDeUso casoDeUso ) {
		this.casoDeUso = casoDeUso;
	}

}
